package com.maduar.demo.thread;

/**
 * Description:
 *
 * @author maduar maduar@163.com
 * @date 2021-03-18 20:49
 */
public class LazySingleton {
    private static volatile LazySingleton instance = null;

    private LazySingleton() {
    }

    public static synchronized LazySingleton getInstance() {
        if (instance == null) {
            instance = new LazySingleton();
        }

        return instance;
    }
}
